package mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import pojo.User;

public interface UserMapper {
    //根据用户名查询用户对象
    @Select("select * from t_user where username = #{username}")
    User selectByUsername(String username);

     //添加新用户
    @Insert("insert into t_user values(null,#{username},#{password})")
    int add(User user);

}
